import 'package:flutter/material.dart';
import 'package:untitled/pages/home/info/index.dart';
import 'package:untitled/pages/home/tab_mine/advertisement.dart';
import 'package:untitled/pages/home/tab_mine/function_button.dart';
import 'package:untitled/pages/home/tab_mine/header.dart';

class TabHome extends StatelessWidget {
  const TabHome({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,//去除appbar和header中间的分割线
        title: Text('我的'),
        //添加AppBar按钮
        actions: [IconButton(icon: Icon(Icons.settings), onPressed: () {
          Navigator.of(context).pushNamed('setting');
        })
        ],
      ),
      body: ListView(
        children: [
          Header(),
          FunctionButton(),
          Advertisement(),
          Info(
            showTitle: true,
          ),

        ],
      ),
    );
  }
}
